home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / sheep_po.swf / scripts / frame_30 / DoAction.as
Encoding:
Text File  |  2010-11-09  |  980 b   |  45 lines

  1. function baa(num, pan)
  2. {
  3.    eval("sheepfx" + num).setPan(pan);
  4.    eval("sheepfx" + num).start();
  5. }
  6. function grr(pan)
  7. {
  8.    dogfx.setPan(pan);
  9.    dogfx.start();
  10.    grrOK = 0;
  11. }
  12. hq = 1;
  13. sheepTotal = 6;
  14. boom = new Array(0,0,0,0,0,0,0);
  15. sheepRate = new Array(0,30,35,45,60,80,105);
  16. sheepBound = 15;
  17. dogAge = 15;
  18. dogRate = 150;
  19. i = 1;
  20. while(sheepTotal >= i)
  21. {
  22.    duplicateMovieClip("sheep","sheep" + i,16384 + (i + 10));
  23.    eval("sheep" + i)._x = 230 + random(90);
  24.    eval("sheep" + i)._y = 150 + random(90);
  25.    eval("sheep" + i).gotoAndPlay(1);
  26.    fxnum = 1 + random(4);
  27.    set("sheepfx" + i,new Sound("sheep" + i));
  28.    eval("sheepfx" + i).attachSound("sheepfx" + fxnum);
  29.    eval("sheepfx" + i).setVolume(40 + random(20));
  30.    i++;
  31. }
  32. dogfx = new Sound("dog");
  33. dogfx.attachSound("dogfx");
  34. sheep._x = 10000;
  35. sheepPocket = 1;
  36. gameover = 0;
  37. nuke = 0;
  38. dogalive = 1;
  39. dog._x = 100;
  40. dog._y = 100;
  41. dog.gotoAndPlay(1);
  42. score = 2000;
  43. grrOK = 1;
  44. play();
  45.